﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="WarehouseManage.aspx.cs"  Inherits="Services_WarehouseManage" %>
<%@ Register Src="../usercontrol/PageNavigator.ascx" TagName="PageNavigator" TagPrefix="uc1" %>
<html>
<head runat="server">
<title>无标题页</title>
<link href="../css/adminCss.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="../js/changerows.js"></script>
<script type="text/javascript">
function CheckAll(form) {
    for (var i=0;i<form.elements.length;i++) {
	    var e = form.elements[i];
	    if (e.name != 'chkall' && e.type=='checkbox')
		    e.checked = form.chkall.checked;
    }
}
</script>
</head>
<body>
    <form id="form1" runat="server">
        <table width="99%" border="0" cellpadding="0" cellspacing="0">
            <tr>
                <td width="31" height="22">
                    <img src="../images/module.gif" width="20" height="22"></td>
                <td style="width: 232px">
                    <asp:Label ID="lblPath" runat="server"></asp:Label></td>
                <td width="990" align="right">
                    <img src="../images/search.gif" alt="搜索" width="16" height="16" />仓库名：<asp:TextBox
                        ID="txtContent" runat="server" CssClass="input1"></asp:TextBox>负责人：<asp:TextBox
                        ID="txtuser" runat="server" CssClass="input1"></asp:TextBox>仓库编号：<asp:TextBox
                        ID="txtadres" runat="server" CssClass="input1"></asp:TextBox>
                    <asp:Button ID="btnSearch" runat="server" Text="搜索" CssClass="submit" OnClick="btnSearch_Click"  /></td>
            </tr>
        </table>
        <table width="99%" border="0" cellpadding="0" cellspacing="0">
            <tr>
                <td bgcolor="#3CB6E5" height="5px">
                </td>
            </tr>
        </table>
        <asp:GridView ID="GvData" runat="server" Width="99%" AutoGenerateColumns="False"  CssClass="gridview" OnRowDataBound="GvData_RowDataBound" EmptyDataText="没有数据">
            <PagerSettings Visible="False" />
            <Columns>
                <asp:BoundField HeaderText="仓库ID" DataField="WarehouseId" >
                    <ItemStyle HorizontalAlign="Center" />
                </asp:BoundField>
                 <asp:BoundField HeaderText="仓库编号" DataField="warebh" >
                    <ItemStyle HorizontalAlign="Center" />
                </asp:BoundField>
                <asp:BoundField HeaderText="仓库名" DataField="WarehouseName" >
                    <ItemStyle HorizontalAlign="Center" />
                </asp:BoundField>
                <asp:BoundField HeaderText="负责人" DataField="WarehouseMan" >
                    <ItemStyle HorizontalAlign="Center" />
                </asp:BoundField>
                <asp:BoundField HeaderText="联系电话" DataField="Phone" >
                    <ItemStyle HorizontalAlign="Center" />
                </asp:BoundField>
                <asp:BoundField HeaderText="仓库地址" DataField="Address" >
                    <ItemStyle HorizontalAlign="Center" />
                </asp:BoundField>
                <asp:BoundField HeaderText="描述" DataField="Content" >
                    <ItemStyle HorizontalAlign="Center" />
                </asp:BoundField>
                <asp:BoundField HeaderText="编辑人" DataField="EditUserName" >
                    <ItemStyle HorizontalAlign="Center" />
                </asp:BoundField>
                <asp:BoundField HeaderText="编辑时间" DataField="eidtdat">
                    <ItemStyle Width="80px" HorizontalAlign="Center" />
                </asp:BoundField>
                <asp:BoundField HeaderText="审核状态" DataField="AuditState">
                    <ItemStyle ForeColor="Red" HorizontalAlign="Center" />
                </asp:BoundField>
                <asp:TemplateField HeaderText="操作">
                    <ItemTemplate>
                        <asp:LinkButton ID="lnkbtnEdit" CommandArgument='<%#Eval("WarehouseId") %>' runat="server" OnClick="lnkbtnEdit_Click">修改</asp:LinkButton>
                        <asp:LinkButton ID="lnkbtnFlag" CommandArgument='<%#Eval("WarehouseId") %>' runat="server" OnClick="lnkbtnFlag_Click">审核</asp:LinkButton>
                    </ItemTemplate>
                    <ItemStyle HorizontalAlign="Center" />
                </asp:TemplateField>
            
                   <asp:TemplateField HeaderText="选择">
                    <ItemTemplate>
                        <asp:CheckBox ID="ckFlag" runat="server"   Enabled="false"/>
                    </ItemTemplate>
                    <ItemStyle Width="40px" HorizontalAlign="Center" />
                </asp:TemplateField>
            </Columns>
            <EmptyDataRowStyle BackColor="White" BorderStyle="Solid" ForeColor="Red" HorizontalAlign="Center" />
        </asp:GridView>
        
        <table width="99%" border="0" cellspacing="0" cellpadding="0">
            <tr>
             <td style="width: 120px">
                </td>
                <td align="right">
                    <uc1:PageNavigator ID="PageNavigator1" runat="server" DataId="GvData" ConnectionString="connstr" ShowType="Text" PageSize="20" />
                </td>
                <td align="right" style="height: 5px">
                    <input type="checkbox" name="chkall" onclick="CheckAll(this.form)" value="on"><font
                        color="#FF0000">全选</font>&nbsp;
                    <asp:Button ID="btnAdd" runat="server" Text="添加" CssClass="submit" CausesValidation="False"
                        OnClick="btnAdd_Click" />&nbsp;<asp:Button ID="btnFlag" runat="server" Text="批审" CssClass="submit" OnClick="btnFlag_Click" OnClientClick="return confirm('确定要审核吗?')" />&nbsp;<asp:Button
                        ID="btnDel" runat="server" Text="删除" CssClass="submit" OnClick="btnDel_Click" OnClientClick="return confirm('确定要删除吗?')" />
                </td>
            </tr>
        </table>
       
        <asp:HiddenField ID="hfuserId" runat="server" />
         <asp:HiddenField ID="hfxs" runat="server" />
    </form>
</body>
</html>
<script language="javascript"><!--
//senfe("表格名称","奇数行背景","偶数行背景","鼠标经过背景","点击后背景");
 senfe("GvData","#ECF9FC","#FFFFFF","#D6F1F8");
--></script>